package com.example.shirodemo.framework.shiro.core;

import org.apache.shiro.session.Session;
import org.apache.shiro.session.mgt.eis.SessionIdGenerator;

import java.io.Serializable;
import java.util.UUID;

/**
 * <p>
 * 自定义sessionId生成
 * </p>
 *
 * @author SPL
 * @since 2020-02-17 16:23
 */
public class CustomerSessionIdGenerator implements SessionIdGenerator {

    @Override
    public Serializable generateId(Session session) {
        return UUID.randomUUID().toString().replace("-", "");
    }
}
